#ifndef _COBJECT_H
#define _COBJECT_H

#include "windows.h"
#include "CTexture.h"

class CObject
{
public:
	//-------------------------------------------//
	// Constructor and Destructor for this class //
	//-------------------------------------------//
	CObject();
	CObject( float Xpos , float Ypos , float deep , int width , int height );
	virtual ~CObject( );

	//--------------------------------//
	//	Public methods for this class //
	//--------------------------------//
	void		SetImage				( CTexture* Image );
	void		SetPosition				( float NewXpos , float NewYpos );
	void		SetXpos					( float NewXpos );
	void		SetYpos					( float NewYpos );
	void		SetPrevPosition			( float NewPrevXpos , float NewPrevYpos);
	void		SetPrevXpos				( float Xpos );
	void		SetPrevYpos				( float Ypos );
	void		SetSize					( int NewWidth , int NewHeight );
	void		SetWidth				( int NewWidth );
	void		SetHeight				( int NewHeight );
	void		SetAlive				( bool isAlive = true );
	void		SetVisible				( bool isVisible = true );
	void		SetColliable			( bool isColliable = true );
	void		SetDeep					( float deep );

	float		GetXposition			( );
	float		GetYposition			( );
	float		GetPrevXposition		( );
	float		GetPrevYposition		( );
	float		GetDeep					( );
	int			GetWidth				( );
	int			GetHeight				( );
	bool		IsAlive					( );
	bool		IsVisible				( );
	bool		IsColliable				( );


	

	//---------------------------------//
	//	Virtual methods for this class //
	//---------------------------------//
	virtual void		Move			( float dX , float dY );
	virtual RECT		GetBoundBox		( );
	virtual bool		IsCollision		( CObject* pObject );

	virtual void		Update			( float deltaTime );
	virtual void		Render			( float camPosX = 0 , float camPosY = 0 ) ;
protected:
	//-----------------------------------//
	//Protected variables for this class //
	//-----------------------------------//
	CTexture	*m_pImage;						// Display image

private: 
	//-----------------------------------//
	//	Private variables for this class //
	//-----------------------------------//
	float		 m_Xpos;
	float		 m_Ypos;
	float		 m_PrevXpos;
	float		 m_PrevYpos;
	float		 m_fDeep;
	

	int			 m_nWidth;
	int			 m_nHeight;

	bool		 m_isAlive;
	bool		 m_isVisible;
	bool		 m_isColliable;
};

#endif